import request from '@/utils/request'
import {getToken} from "../../utils/auth";

export function Analysis(data) {
  return request({
    url: '/bearingData/signal/analysis',
    method: 'post',
    data: data
  })
}

export function GetAnalysis(query) {
  return request({
    url: '/bearingData/signal/list',
    method: 'get',
    params: query
  })
}

export function delAnalysis(id) {
  return request({
    url: '/bearingData/signal/' + id,
    method: 'delete'
  })
}

export function getPdf(data) {
  return request({
    url: '/bearingData/signal/download',
    method: 'post',
    data: data,
    responseType: 'blob',
    headers: {
      'Authorization': 'Bearer ' + getToken()
    }
  })
}

